/* 鼠标点击特效 */
jQuery(document).ready(function ($) {
    let index = this.a_indx || 0
    $('body').click(function (e) {
        function getHSL (h, s, l) {
            h = h || (360 * Math.random()).toFixed()
            s = s || 100 + '%'
            l = l || 50 + '%'
            return 'hsl(' + h + ', ' + s + ',' + l + ')'
        }
        var popText = new Array(
            '客子光阴书卷里',
            '允公允能',
            '上善若水，利万物而不争',
            '皮一下',
            '丫头妆安否',
            '雅志莫相违'
        )
        var $popDom = $('<span>').text(popText[index])
        index = (index + 1) % popText.length
        var x = e.pageX,
            y = e.pageY
        $popDom.css({
            'z-index': 99999999,
            top: y - 30,
            left: x,
            position: 'absolute',
            'font-size': '16px',
            color: '#' + Math.random().toString(16).substr(2).substr(0, 6),
            'font-weight': 600,
        })
        $popDom.append("<span style='color: " + getHSL() + "'>&nbsp;☺</span>")
        $('body').append($popDom)
        $popDom.animate({ top: y - 190, opacity: 0 }, 2500, function () {
            $popDom.remove()
        })
    })
})
